package com.peace.hospital.opdept.service.common.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peace.hospital.entity.common.People;
import com.peace.hospital.opdept.mapper.common.PeopleMapper;
import com.peace.hospital.opdept.service.common.IPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 病人表 服务实现类
 * </p>
 *
 * @author 谢晓峰
 * @since 2019-11-11
 */
@Service
public class PeopleServiceImpl extends ServiceImpl<PeopleMapper, People> implements IPeopleService {

    @Autowired
    private PeopleMapper peopleMapper;

    public int addPeople(People people) {
        return peopleMapper.addPeople(people);
    }

    @Override
    public People selectPeopleByPeople(People people) {
        return peopleMapper.selectPeopleByPcode(people.getPcode());
    }

    @Override
    public List<People> getPeopleByNameOrCode(People people) {
        return peopleMapper.getPeopleByNameOrCode(people);
    }
}
